﻿<!--#include file="isLogin.aspx"-->
<%@Import Namespace="System.Text"%>
<%
REM Last ModifyTime:1:39 2009-5-3
call Main()
%>

<script language="vbscript" runat="server">
dim fileName,ruleString,ImgUploadPath,errdescription
dim returnValue


Sub Main()
	fileName=Request.Form("fileName")
	fileName=System.Text.RegularExpressions.Regex.UnEscape(fileName)
	
	ruleString=Request.Form("ruleString")
	ruleString=System.Text.RegularExpressions.Regex.UnEscape(ruleString)
	
	if ruleString="" or fileName="" then
		returnValue=false
	else
		dim mmArt as New WebNote.WebNote()
		ImgUploadPath=mmArt.DirectionPath
		'returnValue=mmArt.DragImage(fileName,ruleString,Define_Switch_CanViewAllFiles)
		returnValue=mmArt.DragImage(fileName,ruleString,false)
		
		if Not returnValue then
			errdescription=mmArt.ErrDescription
			returnValue=false
		else
			returnValue=true
		end if
		mmArt=Nothing
	end if
	
	ServerReturn(returnValue,errdescription)
End Sub

Function ServerReturn(sReturnvalue,errdescription)
	With Response
		.clear()
		.ContentType = "text/xml"
		.Write("<?xml version=""1.0"" encoding=""UTF-8""?>" & vbcrlf)
		.Write("<root>")
		.Write("<returnvalue>" & Lcase(sReturnvalue) & "</returnvalue>")
		.Write("<errordescription>" & errdescription & "</errordescription>")
		.Write("</root>")
		.End
	End With
End Function
</script>


